<template>
  <!-- 雷达图组件 -->
  <div id="main" style="width: 500px; height: 400px"></div>
</template>
<script>
import * as echarts from 'echarts'
export default {
  data() {
    return {}
  },
  created() {},
  mounted() {
    // 基于准备好的dom(必须要有宽高)，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'))
    // 绘制图表
    myChart.setOption({
      title: {
        text: '人力资源绩效表'
      },
      legend: {
        data: ['小明', '小红']
      },
      radar: {
        // shape: 'circle',
        indicator: [
          { name: '工作效率', max: 100 },
          { name: '考勤', max: 100 },
          { name: '积极性', max: 100 },
          { name: '帮助同事', max: 100 },
          { name: '自主学习', max: 100 },
          { name: '正确率', max: 100 }
        ]
      },
      series: [
        {
          name: '小明 vs 小红',
          type: 'radar',
          data: [
            {
              value: [10, 80, 100, 30, 10, 80],
              name: '小明'
            },
            {
              value: [90, 75, 65, 20, 95, 90],
              name: '小红'
            }
          ]
        }
      ]
    })
  },
  methods: {}
}
</script>
<style scoped></style>
